﻿class ControladorBotonBasico {
	private static var listener:Object;
	
	public static function aplicar(receptor:Object):Void {
			if(listener==null || listener==undefined) {
				listener = new Object();
				listener.rollOver = function(evt:Object):Void {
					evt.target.resaltar();
				}
				
				
				listener.rollOut = function(evt:Object):Void {
					evt.target.desresaltar();
				}
		
				listener.releaseOutside = function (evt:Object):Void {
					evt.target.desresaltar();
				}
			}
		
			receptor.addEventListener("rollOver", listener);
			receptor.addEventListener("rollOut", listener);
			receptor.addEventListener("releaseOutside", listener);
	}
}